#include "sCILabel.h"
#include "sComponentLabel.h"
#include "sCRIText.h"
#include "sGUI.h"

namespace sgui
{
namespace inst
{

const std::wstring sComponentInstanceLabel::getText() const
{
    const sComponentRectInstance *rect = getRequiredComponentRect(res::sComponentLabel::REQUIRED_RECT_TEXT);
    const sComponentRectText *rect_text = static_cast<const sComponentRectText*>(rect);
    return rect_text->getText();
}

void sComponentInstanceLabel::setText(const std::wstring& text)
{
    sComponentRectInstance *rect = getRequiredComponentRect(res::sComponentLabel::REQUIRED_RECT_TEXT);
    sComponentRectText *rect_text = static_cast<sComponentRectText*>(rect);
    rect_text->setText(text);
}

sComponentInstanceLabel::sComponentInstanceLabel(sGUI& gui, const res::sComponentObject& object, sComponentInstance* parent) :
	sComponentInstance(gui, object, parent)
{

}

sComponentInstanceLabel::~sComponentInstanceLabel()
{
	//
}

};
};